package com.wenjie.shoprankmonitor;

import java.util.Date;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import com.google.appengine.api.datastore.Key;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Shop_result {
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;
	
	@Persistent
	private String default_url;
	
	@Persistent
	private String 	owner_nick;
	
	@Persistent
	private String good_title;
	
	@Persistent
	private Long num_id;
	
	@Persistent
	private Long owner_score;
	
	@Persistent
	private int rank;
	
	@Persistent
	private Date timestamp;
	
	@Persistent
	private Key_monitor_list monitor_key;
	
	public Shop_result(String default_url, String owner_nick, 
			String good_title, Long num_id, Long owner_score, int rank) {
		this.default_url = default_url;
		this.owner_nick = owner_nick;
		this.good_title = good_title;
		this.num_id = num_id;
		this.owner_score = owner_score; 
		this.rank = rank;
		timestamp = new Date();
	}
	
	public Key getKey() {
		return key;
	}
	
	public void setDefault_url(String default_url) {
		this.default_url = default_url;
	}
	
	public String getDefault_url() {
		return default_url;
	}
	
	public void setOwner_nick(String owner_nick) {
		this.owner_nick = owner_nick;
	}
	
	public String getOwner_nick() {
		return owner_nick;
	}
	
	public void setGood_title(String good_title) {
		this.good_title = good_title;
	}
	
	public String getGood_title() {
		return good_title;
	}
	
	public void setNum_id(Long num_id) {
		this.num_id = num_id;
	}
	
	public Long getNum_id() {
		return num_id;
	}
	
	public void setOwner_score(Long owner_score) {
		this.owner_score = owner_score;
	}
	
	public Long getOwner_score() {
		return owner_score;
	}
	
	public void setRand(int rank) {
		this.rank = rank;
	}
	
	public int getRank() {
		return rank;
	}
	
	public void setTimestamp() {
		timestamp = new Date();
	}
	
	public Date getTimestamp() {
		return timestamp;
	}
	
	public Key_monitor_list getMonitor_key() {
		return monitor_key;
	}
}
